package com.yb.eureka.server.security;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * 配置拦截url并开启SpringSecurity默认的登录(用户名是user,密码在启动日志里,由于配置文件配置了覆盖了默认值)
 * @author biaoyang
 */
@Configuration
public class EurekaSecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
       http.csrf().disable()
               .authorizeRequests().anyRequest().authenticated()
               .and().httpBasic();
    }
}
